from org.inph.module.TaskInfo import TaskInfo
import utils

def findTaskInfo(state="1"):
    return utils.getDicts(TaskInfo.findTaskInfo(state));

def addTaskInfo(dic):
    obj = TaskInfo()
    obj.mergeBean(dic)
    obj.put();
    
def updateTaskInfo(dic):
    obj = TaskInfo.get_by_id(dic["id"])
    obj.mergeBean(dic)
    obj.put();
    
def deleteById(taskId):
    #print(taskId)
    obj = TaskInfo.get_by_id(taskId)
    obj.delete();
    